package com.mercury.tests;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.mercury.beans.*;

public class AspectJTest01 {

	public static void main(String[] args) {
		ApplicationContext actx = new ClassPathXmlApplicationContext("aspectj01.xml");
		TimeBookInterface tb = (TimeBookInterface)actx.getBean("timeBook"); //timeBook
		System.out.println(tb.getClass().getName());
		tb.doAudit("Carson");
		tb.doBreak("Sharon");
		try{
			tb.doCheck("Steven");
		}catch (Exception e){
			System.out.println(e);
		}
		try{
			tb.doDelete(20);
			tb.doDelete(200);
		}catch (Exception e){
			System.out.println(e);
		}
	}
}


